package com.lekang.system.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import com.lekang.common.annotation.Excel;
import com.lekang.common.core.domain.BaseEntity;

/**
 * 家属表对象 family_member
 *
 * @author 刘卓
 * @date 2025-10-20
 */
public class FamilyMember extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 姓名 */
    @Excel(name = "姓名")
    private String name;

    /** 联系方式 */
    @Excel(name = "联系方式")
    private String contact;

    /** 关系 */
    @Excel(name = "关系")
    private String relationship;

    /** 老人编号 */
    @Excel(name = "老人编号")
    private Long elderlyId;

    /** 身份证号 */
    @Excel(name = "身份证号")
    private String idCard;

    /** 地址 */
    @Excel(name = "地址")
    private String address;

    /** 是否紧急联系人（0否 1是） */
    @Excel(name = "是否紧急联系人")
    private String isEmergencyContact;

    /** 逻辑删除 */
    @Excel(name = "逻辑删除")
    private Long isDeleted;

    /** 额外字段1 */
    @Excel(name = "额外字段1")
    private String extraField1;

    /** 额外字段2 */
    @Excel(name = "额外字段2")
    private String extraField2;

    // ===================== 关联老人表实体 =====================
    /** 关联的老人信息（通过elderlyId关联） */
    private Elderly elderly;
    // ========================================================

    // 已有的getter/setter...

    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }

    public String getName() { return name; }
    public void setName(String name) { this.name = name; }

    public String getContact() { return contact; }
    public void setContact(String contact) { this.contact = contact; }

    public String getRelationship() { return relationship; }
    public void setRelationship(String relationship) { this.relationship = relationship; }

    public Long getElderlyId() { return elderlyId; }
    public void setElderlyId(Long elderlyId) { this.elderlyId = elderlyId; }

    public String getIdCard() { return idCard; }
    public void setIdCard(String idCard) { this.idCard = idCard; }

    public String getAddress() { return address; }
    public void setAddress(String address) { this.address = address; }

    public String getIsEmergencyContact() { return isEmergencyContact; }
    public void setIsEmergencyContact(String isEmergencyContact) { this.isEmergencyContact = isEmergencyContact; }

    public Long getIsDeleted() { return isDeleted; }
    public void setIsDeleted(Long isDeleted) { this.isDeleted = isDeleted; }

    public String getExtraField1() { return extraField1; }
    public void setExtraField1(String extraField1) { this.extraField1 = extraField1; }

    public String getExtraField2() { return extraField2; }
    public void setExtraField2(String extraField2) { this.extraField2 = extraField2; }

    // 关联对象的getter/setter
    public Elderly getElderly() { return elderly; }
    public void setElderly(Elderly elderly) { this.elderly = elderly; }

    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("id", id)
                .append("name", name)
                .append("contact", contact)
                .append("relationship", relationship)
                .append("elderlyId", elderlyId)
                .append("elderly", elderly) // 打印关联的老人信息
                .toString();
    }
}